package com.example.spring;

import com.example.entity.Dog;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileSystemResource;

@SuppressWarnings("all")
public class SpringDemo02 {
    public static void main(String[] args) {
        XmlBeanFactory factory = new XmlBeanFactory(new ClassPathResource("applicationContext.xml"));
        Dog dog = (Dog) factory.getBean("dog");
        dog.eat();
        System.out.println(dog);
        System.out.println(factory.getBean("dog"));
    }
}
